<template>

  <div class="cartlist">
      <scroll class="wrapper " ref="catrlist_a">
          <cartlist-item v-for="(item,index) in cartList" :key="index" :item="item" @all_select="all_select" >
          </cartlist-item>
      </scroll>
  </div>

</template>

<script>
import Hub from '@/common/Hub.js'
import CartlistItem from './CartlistItem.vue'
import Scroll from "@/components/common/scroll/Scroll.vue"
import { mapGetters } from 'vuex' 
export default {
    name:"Cartlist",
    methods:{
        all_select(isture){
            Hub.$emit("all_select",isture)
        }
    },

    computed:{
        // 映射计算属性
        ...mapGetters(['cartList'])
    },
    components:{
        Scroll,
        CartlistItem
    },
    activated(){
        this.$refs.catrlist_a.scroll.refresh()
    }
}
</script>

<style scoped>
.wrapper {
    height: calc(100% - 44px - 49px -40px);
}
.cartlist{
    /* margin-top: 44px; */
    padding-top:44px ;
    overflow: hidden;
    height: 100vh;
}
</style>